cmake_minimum_required(VERSION 3.0)

project(test)

file(GLOB_RECURSE SRC_LIST ./*.cpp ./*.cc ./*.cxx ./*.c ./*.h ./*.hpp)

include_directories(${PROJECT_SOURCE_DIR})
include_directories(${PROJECT_SOURCE_DIR}/../common)
include_directories(${PROJECT_SOURCE_DIR}/../communication)
include_directories(${PROJECT_SOURCE_DIR}/../../thirdparty/inc)

link_directories(${PROJECT_SOURCE_DIR}/../../thirdparty/lib)
link_directories(${PROJECT_SOURCE_DIR}/../../bin)

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/../../bin)
add_executable(${PROJECT_NAME} ${SRC_LIST})

#暂时列从可支持编译平台
if(${BUILD_PLATFORM} MATCHES "linux-arm")
    #linux-arm平台
else()
    if(CMAKE_SYSTEM_NAME MATCHES "Windows")  #windows平台
    #if(${BUILD_PLATFORM} MATCHES "windows")
        #windows平台
        target_link_libraries(${PROJECT_NAME} -lcommon -lcommunication -lwsock32 -lws2_32 m)
    else()
        #linux-x86平台
        target_link_libraries(${PROJECT_NAME} -lcommon -lcommunication dl rt m pthread)
    endif()
endif()

